Release 10.1A: OpenEdge Development:
ProDataSets


ProDataSet change events

There are events that you can define for the process of making local changes to the records in a ProDataSet.

The mechanism for defining change events is exactly the same as for defining FILL events. You use the SET-CALLBACK-PROCEDURE method to associate an internal procedure name and the handle of an active procedure instance containing that internal procedure with a fixed event name. Since these are events that occur when the temp-tables themselves are modified while TRACKING-CHANGES is true, it is reasonable that the event procedure could be located either on the client side or on the server side of a distributed application, depending on whether the temp-tables are being changed by user actions on the client or by other business logic actions on the server. Note that there are no distributed calls to event procedures. Progress will not automatically run an event in a server-side procedure from the client. The expectation is that if the temp-table is changed on the client, then the supporting event logic is running on the client. The application can, of course, make its own calls from the client event procedures to procedures on the server, but you must consider the expense of doing this and avoid it wherever possible.

In every case the event procedure receives the ProDataSet object as an INPUT parameter, just as FILL events do. The event procedure can define the parameter as DATASET or as DATASET-HANDLE, depending on whether it has a static definition of the ProDataSet. All of these events are defined on a temp-table buffer, not the ProDataSet itself. That is, the SET-CALLBACK-PROCEDURE method is executed on a temp-table buffer handle.

Event procedures are defined for create and delete events. There is no support for a modify event. This section uses the general term “change statement” to refer to any language statement that causes one of these events. The event procedures all have access to the before images of changed or deleted records using the attributes described earlier.

Progress supports the following events for ProDataSet row-level changes:

If you RETURN ERROR, this raises the Progress error condition as it does elsewhere. You can also set the ERROR-STRING attribute of a row yourself to signal an error internally.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095